package com.group02.community.entity.dict;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 字典类型表
 * </p>
 *
 * @author xl
 * @since 2022-07-01
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_dict_type")
@ApiModel(value = "SysDictType对象", description = "字典类型表")
@ToString
public class SysDictType implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("字典主键")
    @TableId(value = "dict_id", type = IdType.AUTO)
    @ExcelProperty(value = "字典编号")
    private Long dictId;

    @ApiModelProperty("字典名称")
    @TableField("dict_name")
    @ExcelProperty(value = "字典名称")
    private String dictName;

    @ApiModelProperty("字典类型")
    @TableField("dict_type")
    @ExcelProperty(value = "字典类型")
    private String dictType;

    @ApiModelProperty("状态（0正常 1停用）")
    @TableField("status")
    @ExcelProperty(value = "状态")
    private String status;

    @ApiModelProperty("创建者")
    @TableField("create_by")
    @ExcelIgnore
    private String createBy;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill= FieldFill.INSERT)
    @ExcelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新者")
    @TableField("update_by")
    @ExcelIgnore
    private String updateBy;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time",fill= FieldFill.INSERT_UPDATE)
    @ExcelIgnore
    private LocalDateTime updateTime;

    @ApiModelProperty("备注")
    @TableField("remark")
    @ExcelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    @ExcelIgnore
    private LocalDateTime endTime;

    @TableField(exist = false)
    private List<SysDictData> dictData;
}
